1. Field of the Invention
The present invention relates to a curve length measuring device which processes image data obtained by the photographing of an object to be measured to measure a length of an arbitrary curve on a surface of the object to be measured and a measuring method therefor, and a storage medium which stores a control program for measuring a length of such a curve by means of an electronic computer.
2. Description of the Related Art
Among conventional art of this kind for measuring a length of a curve on a surface of an object to be measured are, for example, a technique disclosed in Japanese Patent Laying-Open (Kokai) No. Showa 56-127268, entitled xe2x80x9cImage Processing Devicexe2x80x9d, and that disclosed in Japanese Patent Laying-Open (Kokai) No. Heisei 4-328406, entitled xe2x80x9cImage Measuring Devicexe2x80x9d. The techniques recited in Japanese Patent Laying-Open (Kokai) No. Showa 56-127268 and No. Heisei 4-328406 both trace a curve set in an image to measure and output a length of the curve.
Of the above-described conventional art, the device disclosed in Japanese Patent Laying-Open (Kokai) No. Heisei 4-328406 includes, as illustrated in FIG. 9, an image accumulation unit 91, an image display unit 92, an image input unit 93, a coordinate accumulation unit 94, a sort unit 95, an analysis unit 96 and a data accumulation unit 97. The image accumulation unit 91 stores image data obtained by the photographing of an object to be measured. The image display unit 92 displays an image based on image data stored at the image accumulation unit 91. The coordinate input unit 93 receives input of coordinates of a predetermined point on a curve in a displayed image. The coordinate accumulation unit 94 stores applied coordinates of each point on a curve. The sort unit 95 rearranges coordinates of each point stored in the coordinate accumulation unit 94 based on predetermined rules. More specifically, the unit 95 repeats processing of linking points located closest to each other to generate a segment and then linking end points of the generated segments. When generated segments are connected to have one curve, the unit 95 regards the order of the points on the curve in question as the order of coordinates. The analysis unit 96 calculates a length of the curve in question based on the rearranged coordinates. The data accumulation unit 97 stores calculation results.
As described in the foregoing, operability can be improved because rearrangement of input coordinates by the sort unit 95 enables points on a curve to be input in an arbitrary order. A further characteristic is that since the sort unit 95 rearranges coordinates by simple processing, a curve length can be calculated in a short time.
As described above, the conventional curve length measuring techniques recited in the above literature are for processing image data of an object to be measured to calculate a length of a desired curve and both techniques use single image data of an object to be measured as an object to be processed. Therefore, a length of a curve to be measured varies depending on a positional relationship between an object to be measured and a photographing device (camera) at the time of the photographing of the object to be measured. For example, even with the same curve on a surface of an object to be measured, an apparent length of the curve is shorter by the photographing far from the object than by the photographing close to the object. An apparent length of a curve also depends on a direction of the object to be measured against the photographing device at the time of the photographing of the object to be measured. As a result, the obtained curve length does not always reflect a length of a corresponding curve of an actual object to be measured.
As described in the foregoing, conventional curve length measuring techniques have a drawback that a length of a curve on an image varies depending on a positional relationship between an object to be measured and a photographing device because a curve length is calculated with single image data of the object to be measured as an object to be processed. The drawback of the conventional techniques is conspicuous when calculation is made of a length of a complicated curve on a surface of an object to be measured which has a three-dimensional shape.
An object of the present invention is to provide a curve length measuring device capable of accurately measuring a length of a desired curve on a surface of an object to be measured independently of a positional relationship between the object to be measured and a photographing device such as a distance between the object to be measured and the photographing device and a direction of the object to be measured against the photographing device and a measuring method therefor, and a storage medium which stores a control program for measuring a length of a curve.
According to the first aspect of the invention, a curve length measuring device which processes image data obtained by the photographing of an object to be measured to measure a length of an arbitrary curve on a surface of the object to be measured, comprises
photographing means for photographing the object to be measured from two or more different viewpoints to obtain a plurality of image data,
measuring point setting means for setting, on the image photographed by the photographing means, a measuring point sequence along a curve to be measured,
curved surface calculating means for setting parabolic half-lines directed from a predetermined reference point at a photographing position of the object to be measured by the photographing means toward each the measuring point sequence set by the measuring point setting means and interpolating a group of half-lines to obtain a curved surface,
intersection calculating means for obtaining an intersection of the plurality of the curved surfaces obtained by the curved surface calculating means, and
intersection length calculating means for obtaining a length of the intersection obtained by the processing by the intersection calculating means.
In the preferred construction, the curve length measuring device further comprises intersection length displaying means for displaying a length of the intersection obtained by the processing by the intersection calculating means on a display device.
In another preferred construction, the intersection calculating means
determines an intersection and generates points of intersection between the half-line and the curved surface in order, starting with the half-line at one edge of the curved surface and ending with the half-line at the other edge.
In another preferred construction, in a case where two kinds of image data of the object to be measured is obtained from different viewpoints by the photographing means,
when a predetermined point of intersection is made by an intersection between a predetermined one of the half-lines extending from the reference point of the photographing means at the time of acquisition of first the image data and a predetermined partial curved surface which is a part divided by the half-lines adjacent to each other among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing device at the time of acquisition of second the image data, the intersection calculating means, as the processing of obtaining a point of intersection subsequent to the intersection point in question,
determines whether, among the half-lines corresponding to first the image data, a half-line subsequent to the predetermined half-line intersects with the predetermined partial curved surface,
when the half-line intersects with the predetermined partial curved surface, regards the point of intersection in question as an intersection point,
when the half-line fails to intersect with the predetermined partial curved surface, determines whether among the half-lines corresponding to second the image data and out of the half-lines forming the predetermined partial curved surface, the half-line whose order of the intersection determination and intersection point generation processing is lower intersects with a partial curved surface formed by the predetermined half-line and the subsequent one of the half-lines among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing device at the time of acquisition of first the image data, and
when the half-line intersects with the partial curved surface, regards the point of intersection in question as an intersection point.
In another preferred construction, in a case where two kinds of image data of the object to be measured is obtained from different viewpoints by the photographing means,
when a predetermined point of intersection is made by an intersection between a predetermined one of the half-lines extending from the reference point of the photographing means at the time of acquisition of first the image data and a predetermined partial curved surface which is a part divided by the half-lines adjacent to each other among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing device at the time of acquisition of second the image data, the intersection calculating means, as the processing of obtaining a point of intersection subsequent to the intersection point in question,
determines whether, among the half-lines corresponding to first the image data, a half-line subsequent to the predetermined half-line intersects with the predetermined partial curved surface,
when the half-line intersects with the predetermined partial curved surface, regards the point of intersection in question as an intersection point,
when the half-line fails to intersect with the predetermined partial curved surface, determines whether among the half-lines corresponding to second the image data and out of the half-lines forming the predetermined partial curved surface, the half-line whose order of the intersection determination and intersection point generation processing is lower intersects with a partial curved surface formed by the predetermined half-line and the subsequent one of the half-lines among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing device at the time of acquisition of first the image data,
when the half-line intersects with the partial curved surface, regards the point of intersection in question as an intersection point,
repeatedly executes each of the foregoing processing until reaching the half-line at the other edge of the curved surface, and
links an obtained sequence of intersection points to generate an intersection after reaching the half-line at the other edge of the curved surface.
According to the second aspect of the invention, a curve length measuring method of processing image data obtained by the photographing of an object to be measured to measure a length of an arbitrary curve on a surface of the object to be measured, comprising the steps of
photographing the object to be measured from two or more different viewpoints to obtain a plurality of image data,
setting, on the image photographed, a measuring point sequence along a curve to be measured,
setting parabolic half-lines directed from a predetermined reference point at a photographing position of the image of the object to be measured toward each the measuring point sequence,
interpolating the group of half-lines to obtain a curved surface,
obtaining an intersection of the obtained plurality of the curved surfaces, and
obtaining a length of the intersection obtained.
In the preferred construction, the intersection obtaining step further comprises the step of
determining an intersection and generating points of intersection between the half-line and the curved surface in order, starting with the half-line at one edge of the curved surface and ending with the half-line at the other edge.
In another preferred construction, in a case of obtaining two kinds of image data of the object to be measured from different viewpoints,
when a predetermined point of intersection is made by an intersection between a predetermined one of the half-lines extending from the reference point of the photographing means at the time of acquisition of first the image data and a predetermined partial curved surface which is a part divided by the half-lines adjacent to each other among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing position at the time of acquisition of second the image data, the intersection obtaining step further comprises the steps of, as the processing of obtaining a point of intersection subsequent to the intersection point in question:
determining whether, among the half-lines corresponding to first the image data, the half-line subsequent to the predetermined half-line intersects with the predetermined partial curved surface,
when the half-line intersects with the predetermined partial curved surface, regarding the point of intersection in question as an intersection point,
when the half-line fails to intersect with the predetermined partial curved surface, determining whether among the half-lines corresponding to second the image data and out of the half-lines forming the predetermined partial curved surface, the half-line whose order of the intersection determination and intersection point generation processing is lower intersects with a partial curved surface formed by the predetermined half-line and the subsequent one of the half-lines among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing position at the time of acquisition of first the image data, and
when the half-line intersects with the partial curved surface, regarding the point of intersection in question as an intersection point.
In another preferred construction, in a case of obtaining two kinds of image data of the object to be measured from different viewpoints,
when a predetermined point of intersection is made by an intersection between a predetermined one of the half-lines extending from the reference point of the photographing means at the time of acquisition of first the image data and a predetermined partial curved surface which is a part divided by the half-lines adjacent to each other among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing position at the time of acquisition of second the image data, the intersection obtaining step further comprises the steps of, as the processing of obtaining a point of intersection subsequent to the intersection point in question:
determining whether, among the half-lines corresponding to first the image data, the half-line subsequent to the predetermined half-line intersects with the predetermined partial curved surface,
when the half-line intersects with the predetermined partial curved surface, regarding the point of intersection in question as an intersection point,
when the half-line fails to intersect with the predetermined partial curved surface, determining whether among the half-lines corresponding to second the image data and out of the half-lines forming the predetermined partial curved surface, the half-line whose order of the intersection determination and intersection point generation processing is lower intersects with a partial curved surface formed by the predetermined half-line and the subsequent one of the half-lines among the curved surfaces obtained by the interpolation of the half-lines extending from the reference point of the photographing position at the time of acquisition of first the image data,
when the half-line intersects with the partial curved surface, regarding the point of intersection in question as an intersection point,
repeatedly executing each of the foregoing processing until reaching the half-line at the other edge of the curved surface, and
linking an obtained sequence of intersection points to generate an intersection after reaching the half-line at the other edge of the curved surface.
According to another aspect of the invention, a computer readable memory storing a control program for controlling a data processing device to process image data obtained by the photographing of an object to be measured and measure a length of an arbitrary curve on a surface of the object to be measured, the control program comprises the steps of
photographing the object to be measured from two or more different viewpoints to obtain a plurality of image data,
setting, on the image photographed, a measuring point sequence along a curve to be measured,
setting parabolic half-lines directed from a predetermined reference point at a photographing position of the image of the object to be measured toward each the measuring point sequence,
interpolating the group of half-lines to obtain a curved surface,
obtaining an intersection of the obtained plurality of the curved surfaces, and
obtaining a length of the intersection obtained.
Other objects, features and advantages of the present invention will become clear from the detailed description given herebelow.